package com.douwong.student.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @autor yichao
 * @time 2016/11/114:11
 * @des 学生的状态
 */
public enum E_StudentState {

    /**
     * 锁屏
     */
    lock(1),
/**关闭锁屏*/
    unlocked(2),
    /**
     * 师生同步
     */
    sync(3),
    /**关闭锁屏*/
    unsync(4);


    private int value;

      E_StudentState(int value) {
        this.value = value;
    }

    public void setValue(int value) {
        this.value = value;
    }
    @JsonValue
    public int getValue() {
        return value;
    }
    @JsonCreator
    public static E_StudentState getItem(int value){
        for(E_StudentState item :values()){
            if (item.getValue()==value){
                return item;
            }
        }
        return null;
    }
}
